/*
 * @brief :   
 * @date :  2021-11-xx
 * @version : v1.0.0
 * @copyright(c) 2020 : OptoMedic company Co.,Ltd. All rights reserved
 * @Change Logs:   
 * @date         author         notes:  
 */
#ifndef __WDG_H__
#define __WDG_H__

enum {
    WDG_OFF = 0,
    WDG_ON,
};
typedef unsigned char wdg_on_off_t;

/*
 * @brief : 打开看门狗  
 */
int wdg_open(const char *devname);

/*
 * @brief : 开启or停止看门狗
 */
int wdg_on_off(int fd, wdg_on_off_t on_off);

/*
 * @brief : 设置看门狗超时时间
 * @param : timeout 超时时间，单位s(秒)
 */
int wdg_set_timeout(int fd, int timeout);

/*
 * @brief : 喂狗
 */
int wdg_feed(int fd);

#endif /* __WDG_H__ */